<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- This meta option will disable scaling of the web page on most mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<title>Explorer Demo</title>
<!-- This loads the OKeez JavaScript API Library and should always be included if you write custom sets -->
<script type="text/javascript" charset="utf-8" src="/lib/api.js"></script>
<script type="text/javascript" src="spry/includes/xpath.js"></script>
<script type="text/javascript" src="spry/includes/SpryData.js"></script>
<script type="text/javascript" src="spry/includes/SpryJSONDataSet.js"></script>
<script type="text/javascript">
<!--
var dsExplorer = new Spry.Data.JSONDataSet(okeez.desktop.explorer.getBrowseUrl());
-->
</script>
<link href="screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
  <div spry:region="dsExplorer" id="content">
    <table id="explorer" width="100%">
      <tbody>
        <tr>
          <th scope="col" spry:sort="iconIndex"></th>
          <th scope="col" spry:sort="fileName">File Name</th>    
        </tr>
      </tbody>
      <tbody spry:repeatchildren="dsExplorer" spry:choose="choose">
        <tr onclick="itemSelect('{command}','{path}', '{isDirectory}')" spry:when="{ds_RowID} == {ds_CurrentRowID}" class="{ds_EvenOddRow}" spry:setrow="dsExplorer" spry:hover="rowHover" spry:select="rowSelected" spry:selected="selected">
          <td><img src="{iconPath}" width="32" height="32"/></td>
          <td>{fileName}</td>
        </tr>
        <tr onclick="itemSelect('{command}','{path}','{isDirectory}')" spry:default="default" class="{ds_EvenOddRow}" spry:setrow="dsExplorer" spry:hover="rowHover" spry:select="rowSelected">
          <td><img src="{iconPath}" width="32" height="32"/></td>
          <td>{fileName}</td>   
        </tr>
      </tbody>
    </table>
  </div>
  <p class="clear"></p>
</div>

<script type="text/javascript">
<!--
	function itemSelect(command, path, isDirectory)
	{
		//alert(escape(path) + " : " + isDirectory);	
		if( isDirectory == "true" )
		{
			dsExplorer.setURL(command);
			dsExplorer.loadData();
		}
		else
		{
			okeez.desktop.explorer.openFile(path);		
		}
	}
-->
</script>


</body>
</html>
